@use "sass:color";
@use "../../variables.scss";

#config-render-component {
  .config-item {
    padding: 10px;
    background-color: variables.$sub-nav-color;
    border-radius: 4px;
  }

  .field {
    margin-top: 15px;

    &:first-child {
      margin-top: 0;
    }
  }

  .hidden {
    display: none;
  }

  .actions-wrapper {
    padding-top: 12px;
    padding-bottom: 12px;
    background: #fff;
    border-top: solid 1px variables.$border-color;
    z-index: 10;
  }

  a {
    text-decoration: none;
    outline: none;
    font-weight: 500;
    color: var(--link-color);

    &:hover {
      cursor: pointer;
      text-decoration: underline;
    }
  }

  .field-section-header {
    font-size: 16px;
    line-height: 20px;
    font-weight: 600;
  }
  .field-section-sub-header {
    font-size: 14px;
    line-height: 18px;
    font-weight: 500;
    white-space: pre-line;
  }
  .field-section-help-text {
    font-size: 12px;
    line-height: 1.5;
    font-weight: 500;
  }
  .default-value-section {
    font-size: 12px;
    line-height: 12px;
    color: variables.$text-color-body-copy;
    font-weight: 500;
    .value {
      color: color.adjust(variables.$primary-color, $lightness: -42%);
    }
  }
  .field.hidden {
    display: none;
  }
  .header-color {
    color: variables.$text-color-primary;
  }
  .sub-header-color {
    color: variables.$text-color-primary;
  }

  .container {
    padding-right: 20px;
    padding-left: 20px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
  }

  /* don't let that chrome autofill yellow ruin the aesthetic of your site */
  input:-webkit-autofill {
    background-color: #ffffff;
  }

  .layout-footer-actions {
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.16);
    padding: 12px 30px 11px;
    background-color: #ffffff;
    z-index: 110;

    &.less-padding {
      padding: 12px 20px 11px;
    }
  }

  .spinningLoaderPath {
    fill: variables.$text-color-primary;
  }

  .AceEditor--wrapper {
    position: relative;
    box-sizing: border-box;

    .error-highlight {
      background: #fbedeb;
      position: absolute;
    }

    .disabled-ace-editor {
      opacity: 0.5;
    }

    .ace_search {
      left: 0;
      right: auto;
    }
  }

  .config-input-error-message {
    color: var(--error-color);
  }

  .config-errblock {
    display: none;
    font-size: 14px;
    color: var(--error-color);
    font-weight: 500;
    line-height: 20px;

    &.visible {
      display: inline-block;
    }
  }

  .field-label {
    font-size: 12px;
    line-height: 12px;
    padding: 2px 4px 3px;
    border-radius: 2px;

    &.required {
      background-color: var(--warning-color-light);
      color: var(--warning-color);
    }
    &.recommended {
      background-color: var(--success-color-light);
      color: var(--success-color);
    }
  }

  input[type="file"] {
    display: none;
  }

  .custom-file-upload > label {
    border: 1px dashed variables.$border-color;
    display: inline-block;
    color: variables.$border-color;
    padding: 15px 17px;
    cursor: pointer;
    border-radius: 4px;
  }

  .file-uploaded {
    border: 1px solid variables.$border-color;
    display: inline-block;
    padding: 15px 17px;
    border-radius: 4px;
    color: variables.$text-color-primary;
  }
}

strong {
  font-weight: bold;
}
